VariableObserver

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var layerId: String
Link copied to clipboard

Functions

Link copied to clipboard
fun observeVariable(observer: Observer<String>, id: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun stopObserving(observer: Observer<String>)
Link copied to clipboard
fun updateVariable(newValue: String)

Updates the LiveData's value asynchronously. This method uses postValue() and is safe to call from any thread (Main or Background). The LiveData observers will receive the update on the main thread shortly after this call. If postValue() is called multiple times rapidly from background threads, only the last value posted before the main thread processes the update will be delivered.